package com.lww.consumer.feignclient;

import com.lww.springcloudapi.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "spring-cloud-provider-integral-8001")
@Repository
@RequestMapping("/integral")
public interface IntegralFeignClient {
    /**
     * 根据排班id获取预约下单数据
     */
    @PostMapping("/exchange")
    public Result findPointsExchange(String phone, Integer cid);


    /**
     * 132 查询所有记录
     *
     * @return
     */
    @ApiOperation(value = "查询所有记录")
    @PostMapping("/findQuery")
    public Result findQuery(@RequestParam(required = false, defaultValue = "1") Integer pageNo,
                            @RequestParam(required = false, defaultValue = "5") Integer pageSize);


    /**
     * 根据id删除记录
     *
     * @param id
     * @return
     */
    @ApiOperation(value = "根据id删除记录")
    @PostMapping("/delGradeLog/{id}")
    public Result findDelGradeLog(@PathVariable("id") Integer id);


}
